﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace ThesisSystem.Models
{
    public class SysMenu
    {
        [Key]
        public int MenuID { get; set; }

        [StringLength(50)]
        [Required(ErrorMessage="*")]
        [Display(Name="标题")]
        public string Title { get; set; }

        [StringLength(50)]
        [Required(ErrorMessage = "*")]
        [Display(Name = "路径")]
        [DisplayFormat(NullDisplayText="javascript:void(0);")]
        public string MenuUrl { get; set; }

        [Display(Name = "序号")]
        public int? SortID { get; set; }

        [Display(Name = "上级菜单")]
        //ParentID为0时代表顶级菜单
        public int ParentID { get; set; }

        [Display(Name="学生")]
        public bool PStudent { get; set; }

        [Display(Name="教师")]
        public bool PTeacher { get; set; }

        [Display(Name="管理员")]
        public bool PAdministrator { get; set; }

        [StringLength(4)]
        [Display(Name="权限")]
        public string Roles { get; set; }

        [StringLength(50)]
        [Display(Name = "备注")]
        public string Mark { get; set; }
    }
}